import javax.swing.JTextArea;


public class Stun extends Ability {

	public Stun(double a, int b, int c, String d, int ... effects) {
		super(a, b, c, d, effects);
	}
	
	public void Fire(Player player, Character Target, JTextArea output, int PlayerTurns) {
		
		if (checkCooldown(PlayerTurns) == false) {

		double cost_modifier = ((100.0 - player.getAgility()) / 100);
		double move_cost = (base_move_cost * cost_modifier);
		player.modifyActionPoints(move_cost);
		Target.modifyActionPoints(dmg_modifier);
		output.append("You whack the " + Target.getName() + " in the side of his head, stunning him.\n");
		TimerStart = PlayerTurns;
		this.checkCooldown(PlayerTurns);
		} else {
			output.append("This ability is on cooldown!\n");
		}
	}
	
	public void FireNPC(Player player, Character Target, JTextArea output, int opponentTurns) {
		Target.modifyActionPoints(base_move_cost);
		player.modifyActionPoints(dmg_modifier);
		output.append(Target.getName() + " whacks you in the side of your head, stunning you.\n");
		for (StatusEffect a : Effects) {
			player.addEffect(a);
		}
		TimerStart_NPC = opponentTurns;
	}
	
}
